﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/AdminPanel/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<WebMVC.Areas.AdminPanel.Models.ReviewItemViewModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Unapproved reviews
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Unapproved reviews</h2>

    <table style="width:100%">
        <tr>
            
            <th>
                Id
            </th>
            <th>
                Commenter
            </th>
            <th>
                Comment
            </th>
            <th>
                Added on
            </th>
            <th>Actions</th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: item.Id %>
            </td>
            <td>
                <%: item.CommenterName %>
            </td>
            <td>
                <%: item.CommentText %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.CreateDate) %>
            </td>
            <td>
                <%: Html.ActionLink("Approve", "ApproveReview", new { id=item.Id })%> |
                <%: Html.ActionLink("Delete", "DeleteReview", new {  id=item.Id })%>
            </td>
        </tr>
    
    <% } %>

    </table>


</asp:Content>

